package com.bkhc.umc.entity;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
*  role
* @author 大狼狗 2019-06-26
*/
@Entity
@Data
@Table(name = "tbl_umc_role")
@EntityListeners(AuditingEntityListener.class)
public class Role implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
    * id
    */
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;
    @Column(name = "role_code")
    private String roleCode ;
    /**
    * rloe_name
    */
    @Column(name = "role_name")
    private String roleName;
    /**
    * role_desc
    */
    @Column(name = "role_desc")
    private String roleDesc;

    @Column(name = "creator",updatable = false)

    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;

}